#include <stdio.h>
#include <string.h>
int main(int argc, char const *argv[])
{
    double num;
    char c[3];
    printf("请在键盘中输入一个数和单位（如 123.45 mm 或 123.45 mil):\n");
    scanf("%lf %s", &num, c);
    if (strcmp(c, "mm") == 0)
    {
        double change_to_mil = 39.3701 * num;
        printf("%lfmm=%lfmil\n", num, change_to_mil);
    }
    else if (strcmp(c, "mil") == 0)
    {
        double change_to_mm = 0.0254 * num;
        printf("%lfmil=%lfmm\n", num, change_to_mm);
    }
    return 0;
}
